const fearNotLetter = str => {
  const letters = "abcdefghijklmnopqrstuvwxyz";
  const first = letters.indexOf(str[0]);
  const last = letters.indexOf(str[str.length - 1]);
  const fullLetters = letters.slice(first, last + 1);
  for (const char of fullLetters) {
    if (!str.includes(char)) {
      return char;
    }
  }
  return undefined;
}


let output = fearNotLetter("abce");
console.log(output);